﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WeiBo.Model;

namespace WeiBo
{
    /// <summary>
    /// Pub 的摘要说明
    /// </summary>
    public class Pub : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            var user = context.Request["user"];
            var message = context.Request["message"];
            user.Publish(message);
            context.Response.Write("user:" + user + ",message:" + message);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}